package com.lefevre.cms.common;

import lombok.Getter;

/**
 * 状态码
 *
 * @author Kurtz
 */
@Getter
public enum ApiResultEnum {

    /**
     * 成功
     **/
    SUCCESS(200, "成功"),
    FAILURE(500, "失败"),
    BAD_REQUEST(400, "接口参数有误"),
    NOT_LOGIN(401, "未登录,请先登录"),
    AUTHORIZED(403, "无权限,请联系管理员授权");

    /**
     * 返回状态码
     **/
    private final Integer code;
    /**
     * 返回信息描述
     **/
    private final String message;

    ApiResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
